home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
dev
/
obero
/
oberon_lib.lha
/
oberon-a
/
source1.lha
/
source
/
Amiga
/
Prefs.mod
< prev
next >
Wrap
Text File
|
1994-08-08
|
22KB
|
839 lines
(*************************************************************************
$RCSfile: Prefs.mod $
Description: Interface to new Preferences
Created by: fjc (Frank Copeland)
$Revision: 3.1 $
$Author: fjc $
$Date: 1994/08/08 01:17:22 $
Includes Release 40.15
(C) Copyright 1991-1993 Commodore-Amiga, Inc.
All Rights Reserved
Oberon-A Interface Copyright © 1994, Frank Copeland.
This file is part of the Oberon-A Interface.
See Oberon-A.doc for conditions of use and distribution.
*************************************************************************)
MODULE Prefs;
(*
** $C- CaseChk $I- IndexChk $L+ LongAdr $N- NilChk
** $P- PortableCode $R- RangeChk $S- StackChk $T- TypeChk
** $V- OvflChk $Z- ZeroVars
*)
IMPORT
E := Exec,
T := Timer,
G := Graphics,
I := Intuition,
SYS := SYSTEM;
(*
** $VER: prefhdr.h 38.1 (19.6.91)
**
** File format for preferences header
*)
(************************************************************************)
CONST
idPREF * = 050524546H; (* MAKE_ID('P','R','E','F') *)
idPRHD * = 050524844H; (* MAKE_ID('P','R','H','D') *)
TYPE
PrefHeaderPtr * = CPOINTER TO PrefHeader;
PrefHeader * = RECORD
version * : E.UBYTE; (* version of following data *)
type * : E.UBYTE; (* type of following data *)
flags * : SET; (* always set to 0 for now *)
END;
(************************************************************************)
(*
** $VER: font.h 38.2 (27.9.91)
**
** File format for font preferences
*)
(************************************************************************)
CONST
idFONT * = 0464F4E53H; (* MAKE_ID('F','O','N','T') *)
fontNameSize * = 128;
TYPE
FontPrefsPtr * = CPOINTER TO FontPrefs;
FontPrefs * = RECORD
reserved * : ARRAY 3 OF LONGINT;
reserved2 * : E.UWORD;
type * : E.UWORD;
frontPen * : E.UBYTE;
backPen * : E.UBYTE;
drawMode * : E.BSET;
textAttr * : G.TextAttr;
name * : ARRAY fontNameSize OF CHAR;
END;
CONST
(* constants for FontPrefs.fp_Type *)
fpWbFont * = 0;
fpSysFont * = 1;
fpScreenFont * = 2;
(************************************************************************)
(*
** $VER: icontrol.h 39.1 (1.10.92)
**
** File format for intuition control preferences
*)
(************************************************************************)
CONST
idICTL * = 04943534CH; (* MAKE_ID('I','C','T','L') *)
TYPE
IControlPrefs * = RECORD
reserved * : ARRAY 4 OF LONGINT; (* System reserved *)
timeOut * : E.UWORD; (* Verify timeout *)
metaDrag * : INTEGER; (* Meta drag mouse event *)
flags * : SET; (* IControl flags (see below) *)
wBtoFront * : E.UBYTE; (* CKey: WB to front *)
frontToBack * : E.UBYTE; (* CKey: front screen to back *)
reqTrue * : E.UBYTE; (* CKey: Requester TRUE *)
reqFalse * : E.UBYTE; (* CKey: Requester FALSE *)
END;
CONST
(* flags for IControlPrefs.ic_Flags *)
icCoerceColors * = 0;
icCoerceLace * = 1;
icStrGadFilter * = 2;
icMenuSnap * = 3;
icModePromote * = 4;
(************************************************************************)
(*
** $VER: input.h 38.2 (28.6.91)
**
** File format for input preferences
*)
(************************************************************************)
CONST
idINPT * = 0494E5054H; (* MAKE_ID('I','N','P','T'); *)
TYPE
InputPrefsPtr * = CPOINTER TO InputPrefs;
InputPrefs * = RECORD
keymap * : ARRAY 16 OF CHAR;
pointerTicks * : E.UWORD;
doubleClick * : T.TimeVal;
keyRptDelay * : T.TimeVal;
keyRptSpeed * : T.TimeVal;
mouseAccel * : INTEGER;
END;
(************************************************************************)
(*
** $VER: locale.h 38.4 (5.12.91)
**
** File format for locale preferences
*)
(************************************************************************)
CONST
idLCLE * = 04C434C45H; (* MAKE_ID('L','C','L','E') *)
idCTRY * = 043545259H; (* MAKE_ID('C','T','R','Y') *)
TYPE
CountryPrefsPtr * = CPOINTER TO CountryPrefs;
CountryPrefs * = RECORD
reserved * : ARRAY 4 OF E.ULONG;
countryCode * : E.ULONG;
telephoneCode * : E.ULONG;
measuringSystem * : E.UBYTE;
dateTimeFormat * : ARRAY 80 OF CHAR;
dateFormat * : ARRAY 40 OF CHAR;
timeFormat * : ARRAY 40 OF CHAR;
shortDateTimeFormat * : ARRAY 80 OF CHAR;
shortDateFormat * : ARRAY 40 OF CHAR;
shortTimeFormat * : ARRAY 40 OF CHAR;
(* for numeric values *)
decimalPoint * : ARRAY 10 OF CHAR;
groupSeparator * : ARRAY 10 OF CHAR;
fracGroupSeparator * : ARRAY 10 OF CHAR;
grouping * : ARRAY 10 OF E.UBYTE;
fracGrouping * : ARRAY 10 OF E.UBYTE;
(* for monetary values *)
monDecimalPoint * : ARRAY 10 OF CHAR;
monGroupSeparator * : ARRAY 10 OF CHAR;
monFracGroupSeparator * : ARRAY 10 OF CHAR;
monGrouping * : ARRAY 10 OF E.UBYTE;
monFracGrouping * : ARRAY 10 OF E.UBYTE;
monFracDigits * : E.UBYTE;
monIntFracDigits * : E.UBYTE;
(* for currency symbols *)
monCS * : ARRAY 10 OF CHAR;
monSmallCS * : ARRAY 10 OF CHAR;
monIntCS * : ARRAY 10 OF CHAR;
(* for positive monetary values *)
monPositiveSign * : ARRAY 10 OF CHAR;
monPositiveSpaceSep * : E.UBYTE;
monPositiveSignPos * : E.UBYTE;
monPositiveCSPos * : E.UBYTE;
(* for negative monetary values *)
monNegativeSign * : ARRAY 10 OF CHAR;
monNegativeSpaceSep * : E.UBYTE;
monNegativeSignPos * : E.UBYTE;
monNegativeCSPos * : E.UBYTE;
calendarType * : E.UBYTE;
END;
TYPE
LocalePrefsPtr * = CPOINTER TO LocalePrefs;
LocalePrefs * = RECORD
reserved * : ARRAY 4 OF E.ULONG;
countryName * : ARRAY 32 OF CHAR;
preferredLanguages * : ARRAY 10 OF CHAR;
gmtOffset * : LONGINT;
flags * : SET;
countryData * : CountryPrefs;
END;
(************************************************************************)
(*
** $VER: overscan.h 38.4 (22.10.92)
**
** File format for overscan preferences
*)
(************************************************************************)
CONST
idOSCN * = 04F53434EH; (* MAKE_ID('O','S','C','N') *)
oscanMagic * = 0FEDCBA89H;
TYPE
OverscanPrefsPtr * = CPOINTER TO OverscanPrefs;
OverscanPrefs * = RECORD
reserved * : E.ULONG;
magic * : E.ULONG;
hStart * : E.UWORD;
hStop * : E.UWORD;
vStart * : E.UWORD;
vStop * : E.UWORD;
displayID * : E.ULONG;
viewPos * : G.Point;
text * : G.Point;
standard * : G.Rectangle;
END;
(* os_HStart, os_HStop, os_VStart, os_VStop can only be looked at if
* os_Magic equals OSCAN_MAGIC. If os_Magic is set to any other value,
* these four fields are undefined
*)
(************************************************************************)
(*
** $VER: palette.h 39.2 (15.6.92)
**
** File format for palette preferences
*)
(************************************************************************)
CONST
idPALT * = 050414C54H; (* MAKE_ID('P','A','L','T') *)
TYPE
PalettePrefsPtr * = CPOINTER TO PalettePrefs;
PalettePrefs * = RECORD
reserved * : ARRAY 4 OF LONGINT; (* System reserved *)
fourColorPens * : ARRAY 32 OF E.UWORD;
eightColorPens * : ARRAY 32 OF E.UWORD;
colors * : ARRAY 32 OF I.ColorSpec; (* Used as full 16-bit RGB values *)
END;
(************************************************************************)
(*
** $VER: pointer.h 39.2 (9.6.92)
**
** File format for pointer preferences
*)
(************************************************************************)
CONST
idPNTR * = 0504E5452H; (* MAKE_ID('P','N','T','R') *)
(************************************************************************)
TYPE
PointerPrefsPtr * = CPOINTER TO PointerPrefs;
PointerPrefs * = RECORD
reserved * : ARRAY 4 OF E.ULONG;
which * : E.UWORD; (* 0=NORMAL, 1=BUSY *)
size * : E.UWORD; (* see <intuition/pointerclass.h> *)
width * : E.UWORD; (* Width in pixels *)
height * : E.UWORD; (* Height in pixels *)
depth * : E.UWORD; (* Depth *)
ySize * : E.UWORD; (* YSize *)
x *, y * : E.UWORD; (* Hotspot *)
(* Color Table: numEntries = (1 << pp_Depth) - 1 *)
(* Data follows *)
END;
(************************************************************************)
CONST
(* constants for PointerPrefs.which *)
wbpNormal * = 0;
wbpBusy * = 1;
(************************************************************************)
TYPE
RGBTablePtr * = CPOINTER TO RGBTable;
RGBTable * = RECORD
red * : E.UBYTE;
green * : E.UBYTE;
blue * : E.UBYTE;
END;
(************************************************************************)
(*
** $VER: printergfx.h 38.2 (3.7.91)
**
** File format for graphics printer preferences
*)
(************************************************************************)
CONST
idPGFX * = 050474658H; (* MAKE_ID('P','G','F','X') *)
TYPE
PrinterGfxPrefsPtr * = CPOINTER TO PrinterGfxPrefs;
PrinterGfxPrefs * = RECORD
reserved * : ARRAY 4 OF LONGINT;
aspect * : E.UWORD;
shade * : E.UWORD;
image * : E.UWORD;
threshold * : INTEGER;
colorCorrect * : E.UBYTE;
dimensions * : E.UBYTE;
dithering * : E.UBYTE;
graphicFlags * : E.WSET;
printDensity * : E.UBYTE; (* Print density 1 - 7 *)
printMaxWidth * : E.UWORD;
printMaxHeight * : E.UWORD;
printXOffset * : E.UBYTE;
printYOffset * : E.UBYTE;
END;
CONST
(* constants for PrinterGfxPrefs.pg_Aspect *)
paHorizontal * = 0;
paVertical * = 1;
(* constants for PrinterGfxPrefs.pg_Shade *)
psBW * = 0;
psGreyScale * = 1;
psColor * = 2;
psGreyScale2 * = 3;
(* constants for PrinterGfxPrefs.pg_Image *)
piPositive * = 0;
piNegative * = 1;
(* flags for PrinterGfxPrefs.pg_ColorCorrect *)
pccRed * = 1; (* color correct red shades *)
pccGreen * = 2; (* color correct green shades *)
pccBlue * = 3; (* color correct blue shades *)
(* constants for PrinterGfxPrefs.pg_Dimensions *)
pdIgnore * = 0; (* ignore max width/height settings *)
pdBounded * = 1; (* use max w/h as boundaries *)
pdAbsolute * = 2; (* use max w/h as absolutes *)
pdPixel * = 3; (* use max w/h as prt pixels *)
pdMultiply * = 4; (* use max w/h as multipliers *)
(* constants for PrinterGfxPrefs.pg_Dithering *)
pdOrdered * = 0; (* ordered dithering *)
pdHalfTone * = 1; (* halftone dithering *)
pdFloyd * = 2; (* Floyd-Steinberg dithering *)
(* flags for PrinterGfxPrefs.pg_GraphicsFlags *)
pgfCenterImage * = 0; (* center image on paper *)
pgfIntegerScaling * = 1; (* force integer scaling *)
pgfAntiAlias * = 2; (* anti-alias image *)
(************************************************************************)
(*
** $VER: printerps.h 38.6 (6.5.93)
**
** File format for PostScript printer preferences
*)
(************************************************************************)
CONST
idPSPD * = 050535044H; (* MAKE_ID('P','S','P','D') *)
TYPE
PrinterPSPrefsPtr * = CPOINTER TO PrinterPSPrefs;
PrinterPSPrefs * = RECORD
reserved * : ARRAY 4 OF LONGINT; (* System reserved *)
(* Global printing attributes *)
driverMode * : E.UBYTE;
paperFormat * : E.UBYTE;
reserved1 * : ARRAY 2 OF E.UBYTE;
copies * : LONGINT;
paperWidth * : LONGINT;
paperHeight * : LONGINT;
horizontalDPI * : LONGINT;
verticalDPI * : LONGINT;
(* Text Options *)
font * : E.UBYTE;
pitch * : E.UBYTE;
orientation * : E.UBYTE;
tab * : E.UBYTE;
reserved2 * : ARRAY 8 OF E.UBYTE;
(* Text Dimensions *)
leftMargin * : LONGINT;
rightMargin * : LONGINT;
topMargin * : LONGINT;
bottomMargin * : LONGINT;
fontPointSize * : LONGINT;
leading * : LONGINT;
reserved3 * : ARRAY 8 OF E.UBYTE;
(* Graphics Options *)
leftEdge * : LONGINT;
topEdge * : LONGINT;
width * : LONGINT;
height * : LONGINT;
image * : E.UBYTE;
shading * : E.UBYTE;
dithering * : E.UBYTE;
reserved4 * : ARRAY 8 OF E.UBYTE;
(* Graphics Scaling *)
aspect * : E.UBYTE;
scalingType * : E.UBYTE;
reserved5 * : E.UBYTE;
centering * : E.UBYTE;
reserved6 * : ARRAY 8 OF E.UBYTE;
END;
CONST
(* All measurements are in Millipoints which is 1/1000 of a point, or
* in other words 1/72000 of an inch
*)
(* constants for PrinterPSPrefs.ps_DriverMode *)
dmPostScript * = 0;
dmPassThrough * = 1;
(* constants for PrinterPSPrefs.ps_PaperFormat *)
pfUSLetter * = 0;
pfUSLegal * = 1;
pfA4 * = 2;
pfCustom * = 3;
(* constants for PrinterPSPrefs.ps_Font *)
fontCourier * = 0;
fontTimes * = 1;
fontHelvetica * = 2;
fontHelvNarrow * = 3;
fontAvantGarde * = 4;
fontBookman * = 5;
fontNewCent * = 6;
fontPalatino * = 7;
fontZapfChancery * = 8;
(* constants for PrinterPSPrefs.ps_Pitch *)
pitchNormal * = 0;
pitchCompressed * = 1;
pitchExpanded * = 2;
(* constants for PrinterPSPrefs.ps_Orientation *)
orientPortrait * = 0;
orientLandscape * = 1;
(* constants for PrinterPSPrefs.ps_Tab *)
tab4 * = 0;
tab8 * = 1;
tabQuart * = 2;
tabHalf * = 3;
tabInch * = 4;
(* constants for PrinterPSPrefs.ps_Image *)
imPositive * = 0;
imNegative * = 1;
(* constants for PrinterPSPrefs.ps_Shading *)
shadBW * = 0;
shadGreyScale * = 1;
shadColor * = 2;
(* constants for PrinterPSPrefs.ps_Dithering *)
dithDefault * = 0;
dithDotty * = 1;
dithVert * = 2;
dithHoriz * = 3;
dithDiag * = 4;
(* constants for PrinterPSPrefs.ps_Aspect *)
aspHoriz * = 0;
aspVert * = 1;
(* constants for PrinterPSPrefs.ps_ScalingType *)
stAspectAsis * = 0;
stAspectWide * = 1;
stAspectTall * = 2;
stAspectBoth * = 3;
stFitsWide * = 4;
stFitsTall * = 5;
stFitsBoth * = 6;
(* constants for PrinterPSPrefs.ps_Centering *)
centNone * = 0;
centHoriz * = 1;
centVert * = 2;
centBoth * = 3;
(************************************************************************)
(*
** $VER: printertxt.h 38.2 (1.7.91)
**
** File format for text printer preferences
*)
(************************************************************************)
CONST
idPTXT * = 050545854H; (* MAKE_ID('P','T','X','T') *)
idPUNT * = 050554E54H; (* MAKE_ID('P','U','N','T') *)
driverNameSize * = 30; (* Filename size *)
deviceNameSize * = 32; (* .device name size *)
TYPE
PrinterTxtPrefsPtr * = CPOINTER TO PrinterTxtPrefs;
PrinterTxtPrefs * = RECORD
reserved * : ARRAY 4 OF LONGINT; (* System reserved *)
driver * : ARRAY driverNameSize OF E.UBYTE; (* printer driver filename *)
port * : E.UBYTE; (* printer port connection *)
paperType * : E.UWORD;
paperSize * : E.UWORD;
paperLength * : E.UWORD; (* Paper length in # of lines *)
pitch * : E.UWORD;
spacing * : E.UWORD;
leftMargin * : E.UWORD; (* Left margin *)
rightMargin * : E.UWORD; (* Right margin *)
quality * : E.UWORD;
END;
CONST
(* constants for PrinterTxtPrefs.pt_Port *)
ppParallel * = 0;
ppSerial * = 1;
(* constants for PrinterTxtPrefs.pt_PaperType *)
ptFanfold * = 0;
ptSingle * = 1;
(* constants for PrinterTxtPrefs.pt_PaperSize *)
psUSLetter * = 0;
psUSLegal * = 1;
psNTractor * = 2;
psWTractor * = 3;
psCustom * = 4;
psEuroA0 * = 5; (* European size A0: 841 x 1189 *)
psEuroA1 * = 6; (* European size A1: 594 x 841 *)
psEuroA2 * = 7; (* European size A2: 420 x 594 *)
psEuroA3 * = 8; (* European size A3: 297 x 420 *)
psEuroA4 * = 9; (* European size A4: 210 x 297 *)
psEuroA5 * = 10; (* European size A5: 148 x 210 *)
psEuroA6 * = 11; (* European size A6: 105 x 148 *)
psEuroA7 * = 12; (* European size A7: 74 x 105 *)
psEuroA8 * = 13; (* European size A8: 52 x 74 *)
(* constants for PrinterTxtPrefs.pt_PrintPitch *)
ppPica * = 0;
ppElite * = 1;
ppFine * = 2;
(* constants for PrinterTxtPrefs.pt_PrintSpacing *)
psSixLPI * = 0;
psEightLPI * = 1;
(* constants for PrinterTxtPrefs.pt_PrintQuality *)
pqDraft * = 0;
pqLetter * = 1;
TYPE
PrinterUnitPrefsPtr * = CPOINTER TO PrinterUnitPrefs;
PrinterUnitPrefs * = RECORD
reserved * : ARRAY 4 OF LONGINT; (* System reserved *)
unitNum * : LONGINT; (* Unit number for OpenDevice() *)
openDeviceFlags * : E.ULONG; (* Flags for OpenDevice() *)
deviceName * : ARRAY deviceNameSize OF E.UBYTE;
(* Name for OpenDevice() *)
END;
(************************************************************************)
(*
** $VER: screenmode.h 38.4 (25.6.92)
**
** File format for screen mode preferences
*)
(************************************************************************)
CONST
idSCRM * = 05343524DH; (* MAKE_ID('S','C','R','M') *)
TYPE
ScreenModePrefsPtr * = CPOINTER TO ScreenModePrefs;
ScreenModePrefs * = RECORD
reserved * : ARRAY 4 OF E.ULONG;
displayID * : E.ULONG;
width * : E.UWORD;
height * : E.UWORD;
depth * : E.UWORD;
control * : E.UWORD;
END;
CONST
(* flags for ScreenModePrefs.smp_Control *)
smAutoScroll * = 1;
(************************************************************************)
(*
** $VER: serial.h 38.2 (10.7.91)
**
** File format for serial preferences
*)
(************************************************************************)
CONST
idSERL * = 05345524CH; (* MAKE_ID('S','E','R','L'); *)
TYPE
SerialPrefsPtr * = CPOINTER TO SerialPrefs;
SerialPrefs * = RECORD
reserved * : ARRAY 3 OF LONGINT; (* System reserved *)
unit0Map * : E.ULONG; (* What unit 0 really refers to *)
baudRate * : E.ULONG; (* Baud rate *)
inputBuffer * : E.ULONG; (* Input buffer: 0 - 65536 *)
outputBuffer * : E.ULONG; (* Future: Output: 0 - 65536 *)
inputHandshake * : E.UBYTE; (* Input handshaking *)
outputHandshake * : E.UBYTE; (* Future: Output handshaking *)
parity * : E.UBYTE; (* Parity *)
bitsPerChar * : E.UBYTE; (* I/O bits per character *)
stopBits * : E.UBYTE; (* Stop bits *)
END;
CONST
(* constants for SerialPrefs.sp_Parity *)
parityNone * = 0;
parityEven * = 1;
parityOdd * = 2;
parityMark * = 3; (* Future enhancement *)
paritySpace * = 4; (* Future enhancement *)
(* constants for SerialPrefs.sp_Input/OutputHandshaking *)
hshakeXON * = 0;
hshakeRTS * = 1;
hshakeNone * = 2;
(************************************************************************)
(*
** $VER: sound.h 38.2 (20.6.91)
**
** File format for sound preferences
*)
(************************************************************************)
CONST
idSOND * = 0534F4E44H; (* MAKE_ID('S','O','N','D') *)
TYPE
SoundPrefsPtr * = CPOINTER TO SoundPrefs;
SoundPrefs * = RECORD
reserved * : ARRAY 4 OF LONGINT; (* System reserved *)
displayQueue * : BOOLEAN; (* Flash the display? *)
audioQueue * : BOOLEAN; (* Make some sound? *)
audioType * : E.UWORD; (* Type of sound, see below *)
audioVolume * : E.UWORD; (* Volume of sound, 0..64 *)
audioPeriod * : E.UWORD; (* Period of sound, 127..2500 *)
audioDuration * : E.UWORD; (* Length of simple beep *)
audioFileName * : ARRAY 256 OF CHAR; (* Filename of 8SVX file *)
END;
CONST
(* constants for SoundPrefs.sop_AudioType *)
spTypeBeep * = 0; (* simple beep sound *)
spTypeSample * = 1; (* sampled sound *)
(************************************************************************)
(*
** $VER: wbpattern.h 39.4 (11.6.92)
**
** File format for wbpattern preferences
*)
(************************************************************************)
CONST
idPTRN * = 05054524EH; (* MAKE_ID('P','T','R','N') *)
(************************************************************************)
TYPE
WBPatternPrefsPtr * = CPOINTER TO WBPatternPrefs;
WBPatternPrefs * = RECORD
reserved * : ARRAY 4 OF E.ULONG;
which * : E.UWORD; (* Which pattern is it *)
flags * : E.WSET;
revision * : SHORTINT; (* Must be set to zero *)
depth * : SHORTINT; (* Depth of pattern *)
dataLength * : E.UWORD; (* Length of following data *)
END;
(************************************************************************)
CONST
(* constants for WBPatternPrefs.wbp_Which *)
wbpRoot * = 0;
wbpDrawer * = 1;
wbpScreen * = 2;
(* wbp_Flags values *)
wbpPattern * = 0;
(* Data contains a pattern *)
wbpNoRemap * = 4;
(* Don't remap the pattern *)
(************************************************************************)
CONST
maxDepth * = 3; (* Max depth supported (8 colors) *)
defPatDepth * = 2; (* Depth of default patterns *)
(* Pattern width & height: *)
patWidth * = 16;
patHeight * = 16;
(************************************************************************)
END Prefs.